

*************************
*** ANALYSIS ZC LEVEL ***
*************************


use zc_level.dta

xtset zipcode year


* FIGURE 1: Parallel Trends: Environmental Regulatory Activities
lgraph lnaction_nonoil year, by(fracked) xline(2005) ytitle("Environmental Regulatory Activities") xtitle("Year") graphregion(color(white)) loptions(1 color(maroon) ; 0 color(navy)) xlabel(1990(2)2014) legend(on order(2 "Fracking Wells" 1 "No Fracking Wells"))


* FIGURE 2: Fracking Developments Over Time
preserve
drop if year < 1998
collapse (sum) frackingwell, by(zipcode year)
replace frackingwell = 1 if frackingwell > 0
lgraph frackingwell year,  ytitle("Share of Zip Codes with Fracking Wells") xtitle("Year") graphregion(color(white)) 
restore


* TABLE 1: Fracking and Environmental Regulation on Non-Energy Industries
xtreg lnaction_nonoil treatment fracked did i.year, fe robust 
xtreg lnaction_nonoil treatment fracked did lnestablishments lnemployment i.year, fe robust 
xtreg lnest_nonoil treatment fracked did i.year, fe robust 
xtreg lnest_nonoil treatment fracked did lnestablishments lnemployment i.year, fe robust 
xtreg lnformal_nonoil treatment fracked did i.year, fe robust 
xtreg lnformal_nonoil treatment fracked did lnestablishments lnemployment i.year, fe robust 

sum lnaction_nonoil lnest_nonoil lnformal_nonoil


* TABLE A2 (upper panel): Descriptive Statistics - Fracking and Environmental Enforcement
sum fracked frackingwell formal_nonoil est_nonoil formal_nonoil establishments employment  











